package com.yuxiu.edu.web.controller;


import com.yuxiu.edu.model.User;
import com.yuxiu.edu.service.IUserService;
import com.yuxiu.edu.web.controller.base.BaseController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author Administrator
 * @date 2020/12/25 06:48:36
 * @description
 */
@Controller
@RequestMapping("user")
public class UserController extends BaseController<User> {

    @Autowired
    private IUserService userService ;
    @RequestMapping("login")
    public String login(){
        System.out.println("用户登录中，请等待..");
        return "Default" ;
    }

    @RequestMapping("find")
    public String find(Integer id){
        System.out.println("用户登录中，请等待..");
        User user = userService.findById(id);
        System.out.println(user);
        return null ;
    }
    @RequestMapping("findAllUser")
    public String findAllUser(){


        return null ;
    }
    @RequestMapping("findByUser")
    public String findByUser(User user){
       return null ;
    }

    @RequestMapping(MANAGE)
    public String manage(){

        return MANAGE_PAGE ;
    }
    @RequestMapping(INFO)
    public String info(){

        return INFO_PAGE;
    }
    @RequestMapping(EDIT)
    public String edit(){

        return EDIT_PAGE ;
    }
    @RequestMapping(UPDATE)
    public String update(){

        return UPDATE_PAGE ;
    }
}
